package com.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the OFFERDETAIL database table.
 * 
 */
@Entity
@NamedQuery(name="Offerdetail.findAll", query="SELECT o FROM Offerdetail o")
public class Offerdetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="OFFERDETAIL_ODID_GENERATOR", sequenceName="OFFERINFO_SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="OFFERDETAIL_ODID_GENERATOR")
	private long odid;
	
	private BigDecimal discount;
	
	private BigDecimal price;
	
	private BigDecimal count;
	
	private BigDecimal num;
	
	private BigDecimal logic;
	
	private String remark;
	
	@Temporal(TemporalType.DATE)
	@Column(name="\"TIME\"")
	private Date time;
	
	//bi-directional many-to-one association to Offerinfo
	@ManyToOne
	@JoinColumn(name="OIID")
	private Offerinfo offerinfo;
	
	//bi-directional many-to-one association to Product
	@ManyToOne
	@JoinColumn(name="ID")
	private Product product;

	public long getOdid() {
		return odid;
	}

	public void setOdid(long odid) {
		this.odid = odid;
	}

	public BigDecimal getDiscount() {
		return discount;
	}

	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getCount() {
		return count;
	}

	public void setCount(BigDecimal count) {
		this.count = count;
	}

	public BigDecimal getNum() {
		return num;
	}

	public void setNum(BigDecimal num) {
		this.num = num;
	}

	public BigDecimal getLogic() {
		return logic;
	}

	public void setLogic(BigDecimal logic) {
		this.logic = logic;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Offerinfo getOfferinfo() {
		return offerinfo;
	}

	public void setOfferinfo(Offerinfo offerinfo) {
		this.offerinfo = offerinfo;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	

}
